# coding:utf-8

import Tkinter


def demo():
    # 创建窗口
    top = Tkinter.Tk()

    li = ['c', 'python', 'java']
    li2 = ['c', 'python', 'java', 'html']

    # 创建列表组件
    lista = Tkinter.Listbox(top)
    listb = Tkinter.Listbox(top)

    # 向列表中插入数据
    for item in li:
        lista.insert(0, item)

    for item in li2:
        for i in range(1):
            listb.insert(i, item)

    # 放入到主窗口中
    lista.pack()
    listb.pack()
    # 进入消息循环
    top.mainloop()


if __name__ == '__main__':
    demo()